package com.xiyi.shouxin.exception;

//错误码
public enum ErrorCode {
    OK(200, "成功"),
    NOTFOUND(1002, "目标不存在"),
    INVALIDPARAMTER(1003, "参数无效"),
    DATAWRONG(1004, "数据异常"),
    WRONGACCOUNT(1005, "账号密码错误"),
    INVALIDACCOUNT(1006, "无效账号"),
    NOPERMISSION(1007, "权限不足"),
    NOLOGIN(1008, "未登录"),
    INVALIDTOKEN(1009, "无效凭证"),
    MAXSIZELIMIT(1010, "超过大小限制"),
    ALREADYEXISTS(1011, "目标已存在"),
    INVALIDCODE(1012, "验证码错误"),
    ALREADYANSWER(1013, "已回答过问卷"),
    ALREADYEXISTSStudent(1014, "学号已存在"),
    INTERNAL(1001, "内部错误");

    private int code;
    private String msg;

    private ErrorCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
